3D User Interfaces and 3D App Building Using the Chrome Library Set of Behaviors
Table of Contents
- Introduction
- Setting Up the Texture Render Format
- Setting Up Hardware Anti-Aliasing (FSAA)
- Setting Up the Shader Blend Level for Reflection
- Opening and Closing the Movable Parts of the Car
- Creating a UI on Top of the 3D Scene
- Changing the Camera
- Creating a 3D Navigation System for a Website
- Controlling Flash from Shockwave 3D
- Afterword and Conclusion
Controlling Macromedia Flash from Shockwave 3D
Now you will do almost the same thing, but in a different way. Instead of displaying an HTML document when a user clicks a model, you will have the playhead jump to a frame in an embedded Macromedia Flash movie. The FLA and SWF files of this tutorial are available in the sample files linked from the beginning of this article.
Note: You need Macromedia Flash MX 2004 to complete this section of the article. Download the trial, or purchase the full version.
- Start with the existing movie and select Save As to create a new one. Give it a file name of your choosing.
- Edit the Movie properties in the Property inspector (Movie tab). Give the Stage a size of 760 pixels in width and 600 pixels in height.
Next, you will create several different labelled keyframes. The Macromedia Flash playhead will jump to a keyframe when the mouse rolls over a given model. Another way would be to create different scenes with each a different name.
- In Macromedia Flash, create a new Flash movie.
- In the Property inspector, enter the label default for the current frame.
- Position the playhead on frame 20 and press F6 to create an empty keyframe.
In the Property tab, enter the label small pyramid.
Figure 31. The Flash Property inspector
Figure 32. The Flash Timeline with the small pyramid frame label.
- Enter some relevant text on the Stage, such as small pyramid building. You could also import a picture and improve the layout or add a display effect. But keep it simple for now.
- Export the SWF file.
In Macromedia Director, import the SWF file you just created.
Figure 33. The Import files dialog box
-
Drag and drop the SWF file from the internal cast onto the Stage, next to the W3D scene. You can tweak its position in the Tweak window or in the Sprite tab of the Property inspector.
If you chose to link to the SWF file on importing (Media > Link to External File), you can access Macromedia Flash from within Director by clicking Launch External Editor in the contextual menu of the Flash cast member in the internal cast. This lets you modify it.
Figure 34. The Launch External Editor menu option
-
Press Done in Macromedia Flash when you have finished altering the SWF file.
Figure 35. Click Done to return to Director
Using these steps, you can move back and forth between Macromedia Flash and Director until you are satisfied with the result.
Figure 36. The Flash Control from Model behavior
-
In Macromedia Director, drag and drop the Flash Control from Model behavior from the Chrome Library onto the W3D sprite, either on the Stage or in the Score. The following dialog box appears:
Figure 37. The Flash Control from Model Parameters dialog box
- Select Small Pyramid for the Model parameter.
- Select the relevant Flash Sprite number.
- Enter the frame label the playhead will jump to: small pyramid.
- By default, the 3D model rollover color is yellow. Click OK.
- Click the Play button in the Control panel or press Enter to start the movie.
When you roll the mouse over the small pyramid, it highlights in yellow and the mouse cursor changes to a hand. Click the small pyramid and the playhead of the Flash sprite jumps to the small pyramid label, displaying the contextual information about this building.
Figure 38. The completed project
Here is the internal cast upon completion of the project:
Figure 39. The internal cast upon completion of the project